home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (c) 1987, DEST Corporation */
-
- /*
- * Header file for Tag Image File Format (TIFF) routines.
- * Originated at Dest, modified at Bear River Associates.
- */
-
- #ifndef _BASICS
-
- typedef short Int16;
- typedef unsigned short UInt16;
-
- typedef long Int32;
- typedef unsigned long UInt32;
-
- typedef char Int8;
- typedef unsigned char UInt8;
- typedef unsigned char Byte;
- typedef char SignedByte;
-
- #define NIL (0L)
- #define TRUE (-1)
- #define FALSE 0
-
- #define _BASICS
- #endif
-
- #ifndef _TIFFLIB_H
-
- /* TIFF data types */
-
- #define BYTE 1
- #define ASCII 2
- #define SHORT 3
- #define LONG 4
- #define RATIONAL 5
-
- #define BYTESIZE 1
- #define ASCIISIZE 1
- #define SHORTSIZE 2
- #define LONGSIZE 4
- #define RATSIZE 8
-
- struct Rational
- {
- Int32 numerator;
- Int32 denominator;
- };
- typedef struct Rational Rational;
-
- struct TiffHeader
- {
- Int16 byteOrder;
- Int16 version;
- Int32 dirOffset;
- };
- typedef struct TiffHeader TiffHeader ;
-
- struct TiffDirEntry
- {
- Int16 tag;
- Int16 type;
- Int32 length;
- Int32 valueOffset;
- };
- typedef struct TiffDirEntry TiffDirEntry ;
-
- struct FieldInfo
- {
- Int16 numTags;
- Int32 numBytes;
- };
- typedef struct FieldInfo FieldInfo ;
-
- /* constants */
- #define INTEL 0x4949
- #define MOTOROLA 0x4d4d
-
- /* tags */
- #define SUBFILE_TYPE_TAG 0x00ff
- #define IMAGE_WIDTH_TAG 0x0100
- #define IMAGE_LENGTH_TAG 0x0101
- #define BITS_PER_SAMPLE_TAG 0x0102
- #define COMPRESSION_TAG 0x0103
-
- #define PHOTOMETRIC_INTERP_TAG 0x0106
- #define THRESHOLDING_TAG 0x0107
- #define CELL_WIDTH_TAG 0x0108
- #define CELL_LENGTH_TAG 0x0109
- #define FILL_ORDER_TAG 0x010a
-
- #define DOCUMENT_NAME_TAG 0x010d
- #define IMAGE_DESCRIPTION_TAG 0x010e
- #define MAKE_TAG 0x010f
- #define MODEL_TAG 0x0110
- #define STRIP_OFFSETS_TAG 0x0111
- #define ORIENTATION_TAG 0x0112
- #define SAMPLES_PER_PIXEL_TAG 0x0115
- #define ROWS_PER_STRIP_TAG 0x0116
- #define STRIP_BYTE_COUNTS_TAG 0x0117
- #define MIN_SAMPLE_VALUE_TAG 0x0118
- #define MAX_SAMPLE_VALUE_TAG 0x0119
- #define X_RESOLUTION_TAG 0x011a
- #define Y_RESOLUTION_TAG 0x011b
- #define PLANAR_CONFIG_TAG 0x011c
- #define PAGE_NAME_TAG 0x011d
- #define X_POSITION_TAG 0x011e
- #define Y_POSITION_TAG 0x011f
- #define FREE_OFFSETS_TAG 0x0120
- #define FREE_BYTE_COUNTS_TAG 0x0121
- #define UNITS_GRAY_RESPONSE 0x0122
- #define CURVE_GRAY_RESPONSE 0x0123
-
- #define numTagTypes 29
-
- /*
- * Legal compression types. See the description of the "Compression" tag
- * in the "Tag Image File Format" abstract.
- *
- */
- #define PACK_TIGHTLY 1
- #define ONE_D_MOD_HUFFMAN 2
-
- /*
- * version number.
- */
- #define LEGAL_VERSION 42
-
- Boolean TFindTag();
- void TGetTag();
- OSErr TPutPtrTag();
- OSErr TPutHdlTag();
- OSErr TReadHeader();
- OSErr TWriteHeader();
- OSErr TReadTags();
- OSErr TWriteTags();
- OSErr TReadImage();
- OSErr TWriteImageStrip();
- void TFixOddRowBytes();
- void TUnfixOddRowBytes();
-
- #define _TIFFLIB_H
- #endif
-